<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center agreement_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub agreement_fd0_0'>
          <view class='flex flex-wrap align-center justify-center agreement_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  agreement_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
              data-url="1">&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='agreement_fd0_0_c1_c0' v-if=" type=='1'">注册协议</text><text class='agreement_fd0_0_c1_c0'
              v-if=" type=='2'">隐私政策</text>
          </view>
          <view class='flex flex-wrap align-center agreement_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-center benben-flex-layout">
        <jyf-parser class='agreement_fd1_0' :html="data.content | richTextFormat">
        </jyf-parser>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "data": {
          "name": "",
          "aid": "",
          "content": "",
          "thumb_img": "",
          "introduce": ""
        },
        "type": "",
        id:''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        type
      } = options
      if (type !== undefined) this.type = type
      this.getDataFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取协议
      async getDataFunc() {
        uni.showLoading({
          title:'加载中'
        })
        if(this.type==1){
          this.id=18
        }else if(this.type==2){
          this.id=19
        }
        let datadata = await this.$api.post(global.apiUrls.post641568f1b6f87, {
          column_id: this.id
        });

        if (datadata.data.code != 1) {
          this.$message.info(datadata.data.msg);
          return
        }
        let infodata = datadata.data;
        this.data = infodata.data
        uni.hideLoading()
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: var(--benbenbgColor1);
    background-size: 100% auto;
  }

  .agreement_flex_0 {
    background: var(--benbenbgColor1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .agreement_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333333;
    line-height: 88rpx;
  }

  .agreement_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .agreement_fd0_0_c0 {
    width: 50rpx;
    height: 50rpx;
  }

  .agreement_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  ::v-deep .agreement_fd1_0 {
    width: 100%;
    padding: 24rpx 32rpx 24rpx 32rpx;
  }
</style>